#include <stdio.h>
#include <ctype.h>
#define MAX 255
int main() {
    char read, this;
    int i = 0;

    printf("Input string with '#' ending:\n");
    while (read != '#') {
        scanf("%c", &read);
        if (read >= 'a' && read <= 'z') {
            read = toupper(read);
        } else if (read >= 'A' && read <= 'Z') {
            read = tolower(read);
        }
        printf("%c", read);
    }
    printf("\n");
    
    return 0;
}
